package com.sikao.app.dao;

import android.content.Context;

import com.sikao.app.bean.Bean;
import com.sikao.app.bean.MyMailBean;
import com.sikao.app.net.OnNetBackListener;
import com.sikao.app.net.SpotsCallBack;
import com.sikao.app.utils.TimeUtil;
import com.squareup.okhttp.Response;

/**
 * Created by y50 on 2016/5/17.
 */
public class MyMailListModel extends BaseModel{


	public MyMailListModel(Context context, OnNetBackListener listener) {
		super(context, listener);
	}

	@Override
	public void request(String data,boolean isShow) {
		String []array = {"user","user","ApiMessage","ownMessageList",time,data};
		map = getMap(array);
		post(map,new SpotsCallBack<MyMailBean>(context,isShow){

			@Override
			public void onSuccess(Response response, MyMailBean result) {
				onNetBackListener.netBack(result);
			}

			@Override
			public void onError(Response response, int code, Exception e) {
				onNetBackListener.netBack(null);
			}
		});
	}
}
